<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <link rel="stylesheet" href="https://cdn.bootcss.com/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body>

  <table class="table table-bordered table-striped">
    <thead>
      <tr>
        <th>序号</th>
        <th>题目</th>
        <th>选项</th>
        <th>答案</th>
        <th>解析</th>
      </tr>
    </thead>
    <tbody id="tbd">
      
    </tbody>
  </table>

  <script src="/questions/week2-1.js"></script>
  <script>
    let html = "";
    questions.forEach((curr, index)=>{
      let options = "";
      curr.questionOptions.forEach((curr, index)=>{
        options += `
          <input type="checkbox" ${curr.isRight == 1 ? "checked='checked'" : ""}>${"ABCD".charAt(index)}. ${curr.content}
        `;
      });
      html += `<tr>
        <td>${index+1}</td>
        <td>${curr.content}</td>
        <td>${options}</td>
        <td>${curr.answer}</td>
        <td>${curr.analyse}</td>
      </tr>`
    });
    document.getElementById("tbd").innerHTML = html;
  </script>
</body>
</html>